from django.template.library import Library
from operate.models import *

register = Library()

@register.filter
def has_collected(user, question):
    if Collect.objects.filter(user=user, question=question).exists():
        return True
    return False